<%@ page language="java" pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/core/common/top.jsp" %>
<script src="${ctx}/core/scripts/jquery_last.js" type="text/javascript" charset="UTF-8"></script>
<script src="${ctx}/core/scripts/formValidator.js" type="text/javascript" charset="UTF-8"></script>
<script src="${ctx}/core/scripts/formValidatorRegex.js" type="text/javascript" charset="UTF-8"></script>
<html>
	<head>
		<title></title>
		<meta http-equiv="Pragma" content="no-cache">
		<meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0">
		<meta http-equiv="Expires" content="0">	
		<script>
			$(document).ready(function(){
				$.formValidator.initConfig({formid:"form0",tidymode:true,onerror:function(msg) {showMessage(msg);}});
				$("#type").formValidator().inputValidator({min:1,onerror:"类型为必选项"});
				$("#name").formValidator().inputValidator({min:1,max:50,onerror:"名称为必填项",onerrormax:"名称超出50个字符"});
				$("#telphone").formValidator().inputValidator({min:7,max:11,onerror:"电话为必填项",onerrormin:"电话少于8位",onerrormax:"电话多于11位"});
				$("#status").formValidator().inputValidator({min:1,onerror:"状态为必选项"});
				$("#city").formValidator().inputValidator({min:1,onerror:"城市为必填项"});
				$("#region").formValidator().inputValidator({min:1,onerror:"区域为必填项"});
				$("#address").formValidator().inputValidator({min:1,onerror:"地址为必填项"});
				$("#positionX").formValidator().inputValidator({min:1,onerror:"经度为必填项"});
				$("#positionY").formValidator().inputValidator({min:1,onerror:"纬度为必填项"});
			});
		</script>
	</head>
	<body>
		<form id="form0" action="${ctx}/platformManage/baseInfoManage.action" method="post" name="mainform">
			<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" valign="top">
				<%@include file="/WEB-INF/core/common/message.jsp"%>
				<tr width="100%">
					<td>
						<table border="0" align="center" cellpadding="0" cellspacing="0">
							<tr width="100%">
								<td width="8" height="27" align="left"><img src="${ctx}/core/images/button_05.gif" width="8" height="27" /></td> 
		    					<td width="99%"  align="left" background="${ctx}/core/images/button_06.gif" class="bluecu">&nbsp;<img src="${ctx}/core/images/icon_04.gif" />&nbsp;合作商属性</td>
		    					<td width="8" align="right"><img src="${ctx}/core/images/button_07.gif" width="8" height="27" /></td>
		    				</tr>
		    			</table>
		    		</td>
		  		</tr>
				<tr>
					<td colspan="3" class="biaoge"  valign="top">
						<table width="100%" border="0" cellpadding="0" cellspacing="1" bordercolor="#FFFFFF">
							<tr align="left">
	      						<!--login name-->
        						<td width="10%" height="20" bgcolor="#DDE4EA" nowrap align="left">&nbsp;类型&nbsp;<font color="red">*</font></td>
		        				<td nowrap width="40%" bgcolor="#DDE4EA" align="left">
		        					<s:if test="pageState=='add'">
							        	<exts:select id="type" name="info.type" value="%{info.type}" pageState="%{pageState}" exclude="0" code="BASEINFO_TYPE" ></exts:select>
							    	</s:if>
							     	<s:else>
							        	<exts:select id="type" name="info.type" value="%{info.type}" pageState="view" exclude="0" code="BASEINFO_TYPE" ></exts:select>
							      	</s:else>
		        					
								</td>
								
        						<td width="10%" nowrap="nowrap" bgcolor="#DDE4EA" align="left">&nbsp;名称&nbsp;<font color="red">*</font></td>
        						<td width="40%" bgcolor="#DDE4EA" align="left">
        							<s:if test="pageState=='add'">
							        	<exts:textfield id="name" name="info.name" value="%{info.name}"  class="textbox_css" style="width:150px"/>
							    	</s:if>
							     	<s:else>
							        	<s:property value="info.name"/>
							      	</s:else>
        							
								</td>
      						</tr>						

						
					        <tr align="left">    							
						        <td height="20" bgcolor="#DDE4EA" nowrap align="left">&nbsp;等级&nbsp;<font color="red"></font></td>
						        <td bgcolor="#DDE4EA" nowrap align="left">
						        	<exts:textfield id="level" name="info.level" value="%{info.level}" pageState="%{pageState}"  class="textbox_css" style="width:150px"/>
								</td>
								
						        <td bgcolor="#DDE4EA" nowrap align="left">&nbsp;联系人&nbsp;</td>
						        <td bgcolor="#DDE4EA" nowrap align="left">
						        	<exts:textfield id="contact" name="info.contact" value="%{info.contact}" pageState="%{pageState}" class="textbox_css" style="width:150px"/>
								</td>
							</tr>
							
							<tr align="left">
      							
						        <td height="20" bgcolor="#DDE4EA" nowrap align="left">&nbsp;电话&nbsp;<font color="red">*</font></td>
						        <td bgcolor="#DDE4EA" nowrap align="left">
						        	<exts:textfield id="telphone" name="info.telphone" value="%{info.telphone}" pageState="%{pageState}"  class="textbox_css" style="width:150px"/>
								</td>
								
						        <td bgcolor="#DDE4EA" nowrap align="left">&nbsp;手机&nbsp;</td>
						        <td bgcolor="#DDE4EA" nowrap align="left">
						        	<exts:textfield id="mobile" name="info.mobile" value="%{info.mobile}" pageState="%{pageState}"   class="textbox_css" style="width:150px"/>
								</td>
							</tr>
							
							<tr align="left">
      							
						        <td height="20" bgcolor="#DDE4EA" nowrap align="left">&nbsp;点数&nbsp;<font color="red"></font></td>
						        <td bgcolor="#DDE4EA" nowrap align="left">
						        	<exts:textfield id="ratio" name="info.ratio" value="%{info.ratio}" pageState="%{pageState}"  class="textbox_css" style="width:150px"/>
								</td>
								
						        <td bgcolor="#DDE4EA" nowrap align="left">&nbsp;状态&nbsp;<font color="red">*</font></td>
						        <td bgcolor="#DDE4EA" nowrap align="left">
						        	<exts:select id="status" name="info.status" value="%{info.status}" pageState="%{pageState}" exclude="0" code="BASEINFO_STATUS" ></exts:select>
								</td>
							</tr>
						
						
      					<!--<s:if test="pageState!='view'">-->
      					    <tr align="left">
      							
						        <td height="20" bgcolor="#DDE4EA" nowrap align="left">&nbsp;城市&nbsp;<font color="red">*</font></td>
						        <td bgcolor="#DDE4EA" nowrap align="left">
						        	<exts:textfield id="city" name="info.city" value="%{info.city}" pageState="%{pageState}"  class="textbox_css" style="width:150px"/>
								</td>
								
						        <td bgcolor="#DDE4EA" nowrap align="left">&nbsp;区域&nbsp;<font color="red">*</font></td>
						        <td bgcolor="#DDE4EA" nowrap align="left">
						        	<exts:textfield id="region" name="info.region" value="%{info.region}" pageState="%{pageState}"  class="textbox_css" style="width:150px"/>
								</td>
							</tr>
						<!--</s:if>-->
												
							<tr align="left">							   
							    <td height="20" bgcolor="#DDE4EA" nowrap align="left">&nbsp;地址&nbsp;<font color="red">*</font></td>
							    <td bgcolor="#DDE4EA" nowrap align="left" colspan=3>
							    	<exts:textfield id="address" name="info.address" value="%{info.address}" pageState="%{pageState}"  class="textbox_css" style="width:740px"/>
								</td>

							</tr>
							
      					    <tr align="left">
      							
						        <td height="20" bgcolor="#DDE4EA" nowrap align="left">&nbsp;经度&nbsp;<font color="red">*</font></td>
						        <td bgcolor="#DDE4EA" nowrap align="left">
						        	<exts:textfield id="positionX" name="info.positionX" value="%{info.positionX}" pageState="%{pageState}"  class="textbox_css" style="width:150px"/>
						        	<s:if test="pageState!='view'">
							        	<input type="button" class="btn" value="获取经纬度"></input>
							    	</s:if>
						        	
								</td>
								
						        <td bgcolor="#DDE4EA" nowrap align="left">&nbsp;纬度&nbsp;<font color="red">*</font></td>
						        <td bgcolor="#DDE4EA" nowrap align="left">
						        	<exts:textfield id="positionY" name="info.positionY" value="%{info.positionY}" pageState="%{pageState}"  class="textbox_css" style="width:150px"/>
								</td>
							</tr>		


							<tr>
								<td height="10" colspan="4" background="../core/images/line5.gif">&nbsp;</td>
							</tr>
							<tr>
								<td height="25" colspan="4" align="center">
									<s:if test="pageState=='add'">
							        	<input name="act" type="hidden" value="addSubmit"/>
							        </s:if>
							        <s:elseif test="pageState=='edit'">
							        	<input name="act" type="hidden" value="editSubmit"/>
							        	<input name="info.baseId" type="hidden" value="<s:text name='%{info.baseId}'/>"/>
							        	<input name="info.name" type="hidden" value="<s:text name='%{info.name}'/>"/>
							        	
							        </s:elseif>
							        
						        	<input name="oldLoginName" type="hidden" value="<s:text name='info.login'/>"/>
							        <s:if test="pageState!='view'">
										<input id="saveButton" type="submit" class="btn" value="<s:text name='button.save'/>"/>
									</s:if>  
							        <input id="returnButton" type="button" class="btn" value="<s:text name='button.return'/>" onclick="location='platformManage/baseInfoManage.action?act=reQuery'"/>
								</td>
							</tr>
						</table>
    				</td>
				</tr>
			</table>
		</form>
	</body>
</html>